alter table CalendarEvents add VacancyId int null
go


alter table CalendarEvents add constraint FK_CalendarEvents_Vacancies_VacancyId 
      foreign key (VacancyId) references Vacancies(Id) 
go

delete from CalendarEvents
go